@model IEnumerable<Loading.Models.BrassLot>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th></th>
        <th>
            ID
        </th>
        <th>
            Name
        </th>
        <th>
            ParentLot
        </th>
        <th>
            Source
        </th>
        <th>
            TimesFired
        </th>
        <th>
            OriginTimesFired
        </th>
        <th>
            Count
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.BrassLotId }) |
            @Html.ActionLink("Details", "Details", new { id=item.BrassLotId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.BrassLotId })
        </td>
        <td>
            @item.BrassLotId
        </td>
        <td>
			@item.Name
        </td>
        <td>
			@(item.ParentLot == null ? "None" : item.ParentLot.Name)
        </td>
        <td>
			@item.Source
        </td>
        <td>
			@item.TimesFired
        </td>
        <td>
			@item.OriginTimesFired
        </td>
        <td>
			@item.Count
        </td>
    </tr>
}

</table>


